#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main() {
	int sumz = 0;
	int n = 0;
	scanf("%d", &n);
	for (int j = 1; j <= 5; j++) {
		int i = 1;
		int sum = 0;
		for (i; i <= j; i++) {
			sum += pow(10, i - 1) * n;
		}
		sumz += sum;
	}
	printf("%d", sumz);
	return 0;
}